package io.xccit.race.mapper;

import java.util.List;
import java.util.Map;
import io.xccit.race.domain.RaceCompetition;

public interface RaceCompetitionMapper {
    RaceCompetition selectRaceCompetitionById(Long id);
    List<RaceCompetition> selectRaceCompetitionList(RaceCompetition query);
    int insertRaceCompetition(RaceCompetition entity);
    int updateRaceCompetition(RaceCompetition entity);
    int deleteRaceCompetitionById(Long id);
    int deleteRaceCompetitionByIds(Long[] ids);
    
    // 统计方法
    Long selectCount();
    List<Map<String, Object>> selectCompetitionTypeDistribution();
    List<Map<String, Object>> selectCompetitionTimeDistribution();
    List<Map<String, Object>> selectNationalCompetitionDistribution();
    
    // 新增方法
    List<RaceCompetition> selectAvailableCompetitions();
    List<RaceCompetition> selectCompetitionsByStatus(Integer competitionStatus);
    List<Map<String, Object>> selectCompetitionStatusCount();
}


